package cn.siat.system.api;

import cn.siat.common.core.constant.SecurityConstants;
import cn.siat.common.core.constant.ServiceNameConstants;
import cn.siat.common.core.domain.R;
import cn.siat.system.api.domain.SysNotice;
import cn.siat.system.api.factory.RemoteUserFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * 用户服务
 * 
 * @author siat
 */
@FeignClient(contextId = "remoteNoticeService",url = "${url.hmzhkj-system}", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
public interface RemoteNoticeService
{
    /**
     * 发送通知
     * @param notice title 标题 content 内容 userIdList 通知用户
     * @param source 请求来源
     * @return 结果
     */
    @GetMapping("/notice/send")
    R<Object> send(@RequestBody SysNotice notice, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
